package com.atguigu.team.junit;
import com.atguigu.team.service.NameListService;
import com.atguigu.team.service.*;
import com.atguigu.team.domain.Employee;
import org.testng.annotations.Test;
public class NameListServiceTest {
    @Test
    public void testGetAllEmployees(){
        NameListService nameListService=new NameListService();
        Employee[] employees= nameListService.getAllEmployees();
        for(int i=0;i<employees.length;i++){
            System.out.println(employees[i]);
        }
    }
    @Test
    public void testGetEmployees(){
        int id=9;
        NameListService nameListService=new NameListService();
        try {
            Employee employee = nameListService.getEmployee(id);
            System.out.println(employee);
        }catch(TeamException e){
            System.out.println(e.getMessage());
        }
    }
}
